/**
 * @ClassName LC476
 * @Author ykx
 * @Date 2024/3/30 13:06
 * @Version 1.0
 */
public class LC476 {
    public int findComplement(int num) {
        int i = 1;
        while (i <= num && i > 0) {
            i *= 2;
        }
        return i - num - 1;
    }
}
